package cn.jeeweb.modules.web.statistics.controller;

import cn.jeeweb.core.security.shiro.authz.annotation.RequiresPathPermission;
import cn.jeeweb.modules.web.statistics.data.EchartsData;
import cn.jeeweb.modules.web.statistics.service.ILaborDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.servlet.http.HttpServletRequest;

@Controller
@RequestMapping("${admin.url.prefix}/statistics/laborData")
@RequiresPathPermission("statistics:laborData")
public class LaborDataController {
    @Autowired
    private ILaborDataService laborDataService;

    @RequestMapping(value="ajaxData")
    public String ajaxData(HttpServletRequest request){
        request.setAttribute("charttype", "bar");
        request.setAttribute("charttitle", "柱状图");
        laborDataService.largeLaborData(request);
        return "modules/labordata/page1";
    }
}
